﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title></title>
</head>
<body>
    <p>调用函数并输出PI值:</p>
    <p id="demo"></p>
    <script>
        function myFunc() {
            return Math.PI;
        }
        document.getElementById("demo").innerHTML = myFunc();
    </script>

</body>
</html>